#define  _CRT_SECURE_NO_WARNINGS 1
#include"string.h"
//using namespace my;
using namespace std;
int main()
{
    //my::string s("abcd");
    ////my::string s1 = s;
    ////s.clear();
    ////cout << s.c_str() << endl;

    //my::string test("abcdefg");
    ////test.reserve(100);
    //test.push_back('m');
    //for (auto& e : test)
    //{
    //    //e += 1;
    //    cout << e;
    //}
    //cout << endl;
    //test.clear();
    //test.push_back('a');
    //for (auto& e : test)
    //{
    //    //e += 1;
    //    cout << e;
    //}
    //cout << endl;

    //my::string test;
    //test.push_back('a');
    //test.append("abcdefg");
    ////test.insert(1, 10, 'a');
    //for (auto& e : test)
    //{
    //    cout << e;
    //}
    //cout << endl;
    //test.insert(5,"ghjkf");
    //test.erase(0,1);
    //for (auto& e : test)
    //{
    //    cout << e;
    //}
    //
    //cout <<endl;

    my::string test("12345");
    //cout << (test.erase(0,1)).c_str() << endl;;
    //size_t a = test.find('5', 5);
    size_t a = test.find("1235");
    cout << a << endl;
    my::string b;
    cout << (test.substr(0, 2)).c_str() << endl;

    for (auto& e : b)
    {
        cout << e;
    }
    cout << endl;
    /*string d;
    string c("123");
    d = c.substr(0, 2);
    cout << d << endl;*/
	return 0;
}